<template>
  <div class="content-header" :class="className">
    <div class="content-head">
      <div class="content-title">{{ title?title:route.meta.title }}</div>
    </div>
  </div>
</template>
<script>
import { useRoute } from 'vue-router'
export default {
  props: {
    title: {
      type: String,
      default: null,
    },
    className:{
      type: String,
      default: null,
    },
  },
  setup() {
    const route = useRoute()
    return {
        route,
    };
  },
};
</script>
<style lang="less" scoped>
.content-head {
  width: 100%;
  padding: 5px 0 14px 20px;
  border-bottom: 1px solid #eef1f5;
  margin-bottom: 20px;
  .content-title {
    position: relative;
    font-size: 15px;
    &::before {
      content: '';
      position: absolute;
      width: 4px;
      height: 16px;
      background: @primary-color;
      top: 4px;
      left: -15px;
    }
  }
}
</style>